﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenWeb.Dal.Models
{
    public class Message
    {

        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Required]
        public int ID { get; set; }

        [Required]
        public UserProfile InviatoDa { get; set; }

        [Required]
        [MaxLength(600,ErrorMessage = "Lunghezza massima del messaggio 600 caratteri")]
        public string Messaggio { get; set; }

        [Display(Name="Richiedi conferma")]
        public bool RichiediConferma { get; set; }

        [Required]
        public ICollection<UserProfile> Destinatari { get; set; }


    }
}
